serde-feature-hack
DEPRECATED: Since Rust 1.31 it's possible to rename dependencies. There is no need to use this crate anymore.
A hack to allow having a feature named serde
which doesn't just depend on serde
In Cargo.toml, you can do the following:
[]
= { = "0.1.0", = true }
[]
= ["serde-feature-hack", "some-other-dependency"]
Then, you can use serde
like you normally would, except the crate name is
serde_feature_hack
. It's possible to import it with the usual serde
name.
extern crate serde_feature_hack as serde;
extern crate serde_json;
use ;
;
assert_eq!;